{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}


<div class="container-fluid content-body">
    <div class="main">
        <!-- left side start-->
        {include admin.inc.menu}
        <!-- left side end-->


        <!-- main content start-->
        <section class="right-section" id="right-section">
            <!-- start of inner-frame -->
            <div class="inner-iframe">

                <!-- page breadcrumb start-->
                {include admin.inc.bread}
                <!-- page "breadcrumb end-->
                <!-- Nav tabs -->
                <ul class="nav nav-tabs">

                    <ul class="nav nav-tabs">

                        <li><a href="add"><i class="glyphicon glyphicon-plus"></i> 添加站内信</a></li>
                        <li {if $id==''}class="active"{/if}><a {if
                                                               $id==''}href="javascript:void(0);"{else}href="{$index_url}"{/if}><i
                                class="glyphicon glyphicon-th-list"></i> 站内信列表</a></li>
                        <!--<li><a href="ruleAdd"><i class="glyphicon glyphicon-plus"></i> 添加规则</a></li>-->
                        <li><a href="ruleIndex"><i class="glyphicon glyphicon-th-list"></i> 规则列表</a></li>
                        <li><a href="tmplAdd"><i class="glyphicon glyphicon-plus"></i> 添加模板</a></li>
                        <li><a href="tmplIndex"><i class="glyphicon glyphicon-th-list"></i> 模板列表</a></li>

                    </ul>
                </ul>
                <div class="inner-container">
                    <form class="form-inline search-form" role="form" id="J_List_Form" >
                        <div class="form-group">
                            <select name="select_mix_option1" class="form-control input-sm"
                                    data-value="{$search_arr[select_mix_option1]}">
                                <option value="member_no">会员号</option>
                                <option value="tmpl_name">模板名称</option>
                            </select>
                        </div>
                        <!-- searchinput -->
                        <div class="form-group">
                            <div class="input-group">

                                <input type="text" class="form-control input-sm" maxlength="{maxlength}"
                                       placeholder="关键词" name="select_mix_option_value1"
                                       value="{$search_arr[select_mix_option_value1]}">
                            </div>
                        </div>

                        <div class="form-group">
                            <select name="select_mix_option2" class="form-control input-sm"
                                    data-value="{$search_arr[select_mix_option2]}">
                                <option value="to_time">发送时间</option>
                            </select>
                        </div>
                        <!-- searchdatetime -->
                        <div class="form-group">
                            <div class="input-group">

                                <input style="width:100px;" class="form-control form-control-inline input-sm mdate"
                                       size="16" type="text"
                                       name="start_time" value="{$search_arr[start_time]}"
                                       placeholder="开始时间"/>

                                <div class="input-group-addon">
                                    -
                                </div>
                                <input style="width:100px;" class="form-control form-control-inline input-sm mdate"
                                       size="16" type="text"
                                       name="end_time" value="{$search_arr[end_time]}"
                                       placeholder="结束时间"/>
                            </div>
                        </div>


                        <div class="input-group">
                            <div class="input-group-addon">
                                发送人
                            </div>
                            <input type="text" class="form-control input-sm" maxlength="20" placeholder="关键词"
                                   name="manager_name" value="{$search_arr['manager_name']}">
                        </div>

                        <input type="hidden" name="order" value="{$order}">
                        <button type="submit" class="btn btn-sm btn-success">搜索</button>
                        {run exportBtn()}
                        <!-- search form end -->
                    <!--</form>
                    <form id="J_List_Form">-->
                        <div class="table-responsive">
                            <table id="J_ListTable" class="table  table-hover  table-striped">
                                <!--tmpl-listtable-->

                                <!-- listblock -->
                                <thead>
                                <tr>
                                    <th width="20"><input type="checkbox" class="icheck check-all"/></th>
                                    <!--tmpl-fieldheaders-->

                                    <th>会员用户
                                    </th>
                                    <th>模板名称
                                    </th>
                                    <th>发送人</th>
                                    <th>发送时间</th>

                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {if empty($items)}
                                <tr>
                                    <td style="text-align:center;" colspan="5" class="empty-table-td">{$emptyRecord}
                                    </td>
                                </tr>
                                {/if}
                                {loop $items $value}
                                <tr data-id="{$value[id]}">
                                    <td><input type="checkbox" class="icheck" name="ids[]" value="{$value[id]}"/></td>
                                    <!--tmpl-fieldlist-->

                                    <td>{$value[member_username]}</td>
                                    <td>{$value[tmpl_name]}</td>
                                    <td>{$value[manager_name]}</td>
                                    <td>{$value[to_time]}</td>
                                    <td>
                                        {if in_case_array('admin/remind/getremindbyid',$priv) || empty($priv)}

                                        <a href="javascript:void(0)" class="btn btn-primary btn-xs js-remind-details">
                                            <i class="glyphicon glyphicon-edit"></i> 详情</a>
                                       {/if}
                                    </td>
                                </tr>
                                {/loop}


                            </table>

                        </div>

                    </form>
                    <div class="text-right" style="float: right">
                        {$pagemenu}
                    </div>

                </div>
            </div>
        </section>
    </div>
</div>

<!--footer section start-->
{include admin.inc.footer}
<!--footer section end-->


<!-- pagescript -->
<script type="text/javascript">
    seajs.use("admin/message_remindindex", function (parameter) {

        /**--tmpl-templatejavascript--**/

        <!--tmpl-templatejavascript-->
        parameter.detailUrl = "{$detail_url}";
        parameter.deleteUrl = "{$delete_url}";
        parameter.editUrl = "{$do_edit_url}";
        parameter.upload_url = "{$upload_url}";
        parameter.image_search_url = "{$image_search_url}";
        parameter.image_list_url = "{$image_list_url}";

        parameter.init();
    });
</script>


<script id="remind-details" type="text/template">
    <div class="tab-content" style="padding: 25px 20px;">
        以下信息不可修改
        <from class="form-horizontal basicForm">
            <div class="form-group" style="padding: 5px 10px;">

                <label class="col-sm-2 control-label">模板名称 </label>
                <div class="col-sm-4">
                    <label class="control-label">{[tmpl_name]} </label>
                </div>
            </div>
            <div class="form-group" style="padding: 5px 10px;">

                <label class="col-sm-2 control-label">站内信内容 </label>
                <div class="col-sm-8" >
                    <label class="control-label" style="text-align: left">{[to_content]}</label>
                </div>
            </div>
            <div class="form-group" style="padding: 5px 10px;">
                <label class="col-sm-2 control-label">发送人</label>
                <div class="col-sm-4">
                    <label class="control-label">{[manager_name]}</label>
                </div>
            </div>
            <div class="form-group" style="padding: 5px 10px;">

                <label class="col-sm-2 control-label">发送时间 </label>
                <div class="col-sm-4">
                    <label class="control-label">{[to_time]} </label>
                </div>
            </div>
        </from>
    </div>
</script>
</body>
</html>
